<?php

$link = mysql_connect('localhost', 'root', 'admin');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db('dbkaryawan');
$email = $_POST['email'];
$sql = "select * from tkaryawan where email='$email'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
echo $row['id'];
?>
